﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="SouthernLand.Controls.NhaDat.AdvanceSearch"
    CodeBehind="AdvanceSearch.ascx.cs" %>
<%@ Import Namespace="SouthernLand.Common.BOL.NhaDat" %>
<%@ Register TagPrefix="southern" Namespace="SouthernLand.Common.Untilities" Assembly="SouthernLand" %>
<%@ Register TagPrefix="southern" Namespace="SouthernLand.Common.BOL.NhaDat" Assembly="SouthernLand" %>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
    <tr>
        <td class="list-real-estate-frame-top-left">
            &nbsp;
        </td>
        <td align="left" class="list-real-estate-frame-top width-98-5-pct">
            <span class="Frame_Title">Tìm kiếm bất động sản</span>
        </td>
        <td class="list-real-estate-frame-top-right">
            &nbsp;
        </td>
    </tr>
    <tr>
        <td class="list-real-estate-frame-mid-left">
        </td>
        <td class="width-98-5-pct padding-top-10">
            <asp:UpdatePanel ID="UpdatePanelDangtin" runat="server">
                <ContentTemplate>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td align="left" width="50%">
                                <table cellpadding="9" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td style="font-weight: bold" width="100px" align="right">
                                            Hình thức :
                                        </td>
                                        <td>
                                            <southern:ddlLoaitin ID="dlLoaitin" ValidationGroup="w4u_Raovat" runat="server" Width="145"
                                                CssClass="Textbox" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" style="font-weight: bold">
                                            Loại BÐS :
                                        </td>
                                        <td>
                                            <southern:ddlCategories ID="dlLoaiBDS" ValidationGroup="w4u_Raovat" runat="server"
                                                Width="145" CssClass="Textbox" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" style="font-weight: bold">
                                            Tỉnh/Thành Phố :
                                        </td>
                                        <td>
                                            <southern:ddlTinhThanh ID="dlTinhthanh" ValidationGroup="w4u_Raovat" AutoPostBack="true"
                                                OnSelectedIndexChanged="dlTinhThanh_SelectedIndexChanged" runat="server" Width="145"
                                                CssClass="Textbox" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" style="font-weight: bold">
                                            Quận/Huyện :
                                        </td>
                                        <td>
                                            <asp:DropDownList runat="server" ID="dlQuanHuyen" ValidationGroup="w4u_Raovat" Width="145" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td align="left" width="50%">
                                <table cellpadding="9" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td width="100px" align="right" style="font-weight: bold">
                                            Giá :
                                        </td>
                                        <td>
                                            <asp:DropDownList ValidationGroup="w4u_Raovat" runat="server" ID="dlGia" Width="145"
                                                CssClass="Textbox">
                                                <asp:ListItem Value="" Text="Tất cả" Selected="True"></asp:ListItem>
                                                <asp:ListItem Value="(Gia=0)|2" Text="Thương lượng"></asp:ListItem>
                                                <asp:ListItem Value="(Gia < 1)|2" Text="< 1 triệu "></asp:ListItem>
                                                <asp:ListItem Value="(Gia >=1 And Gia <=3)|2" Text="1 triệu - 3 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >=3 And Gia <=6)|2" Text="3 triệu - 6 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >=6 And Gia <=10)|2" Text="6 triệu - 10 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia > 10)|2" Text="> 10 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia < 150)|2" Text="< 150 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >= 150 And Gia <=300)|2" Text="150 triệu - 300 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >= 300 And Gia <=600)|2" Text="300 triệu - 600 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >= 600 And Gia <=900)|2" Text="600 triệu - 900 triệu"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >= 1 And Gia <= 1.5)|3" Text="1 tỉ - 1.5 tỉ"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >= 1.5 And Gia <= 2)|3" Text="1.5 tỉ - 2 tỉ"></asp:ListItem>
                                                <asp:ListItem Value="(Gia >= 2 And Gia <= 3)|3" Text="2 tỉ - 3 tỉ"></asp:ListItem>
                                                <asp:ListItem Value="(Gia > 3)|3" Text="> 3 tỉ"></asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold" align="right">
                                            Tổng diện tích :
                                        </td>
                                        <td>
                                            <asp:DropDownList ValidationGroup="w4u_Raovat" runat="server" ID="dlTongDienTich"
                                                Width="145" CssClass="Textbox">
                                                <asp:ListItem Value="" Text="Tất cả" Selected="True"></asp:ListItem>
                                                <asp:ListItem Value="(DientichDat < 50)" Text="< 50 m2"></asp:ListItem>
                                                <asp:ListItem Value="(DientichDat >=50 And DientichDat <= 100)" Text="50 m2 - 100 m2"></asp:ListItem>
                                                <asp:ListItem Value="(DientichDat >=100 And DientichDat <= 150)" Text="100 m2 - 150 m2"></asp:ListItem>
                                                <asp:ListItem Value="(DientichDat >=150 And DientichDat <= 200)" Text="150 m2 - 200 m2"></asp:ListItem>
                                                <asp:ListItem Value="(DientichDat >=200 And DientichDat <= 300)" Text="200 m2 - 300 m2"></asp:ListItem>
                                                <asp:ListItem Value="(DientichDat >=300 And DientichDat <= 500)" Text="300 m2 - 500 m2"></asp:ListItem>
                                                <asp:ListItem Value="(DientichDat > 500)" Text="> 500 m2"></asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" style="font-weight: bold">
                                            Hướng :
                                        </td>
                                        <td>
                                            <southern:ddlHuongNha ID="dlHuongNha" ValidationGroup="w4u_Raovat" runat="server"
                                                Width="145" CssClass="Textbox" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" style="font-weight: bold">
                                            Tình trạng PL :
                                        </td>
                                        <td>
                                            <southern:ddlTinhTrangPL ID="dlTinhTrangPL" ValidationGroup="w4u_Raovat" runat="server"
                                                Width="145" CssClass="Textbox" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="center" class="padding-8">
                                <asp:Button runat="server" ID="btSearch" CssClass="button-my-find" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="center">
                                <asp:Panel runat="server" ID="PanelMsg" Visible="false">
                                    <div style="padding-top: 15pt; padding-left: 8px; padding-bottom: 10px;">
                                        <p align="center" style="font-size: 14px; color: Red; font-weight: bold;">
                                            Kết quả tìm kiếm</p>
                                        <asp:Label runat="server" ID="lblMsg" Font-Bold="true" Font-Size="13" ForeColor="#2564c0"></asp:Label>
                                    </div>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td class="list-real-estate-menu-left-line">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Repeater runat="server" ID="rptRaovat">
                                                <ItemTemplate>
                                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td colspan="4" height="5px">
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="preview-photos-house-box">
                                                                <div class="padding-top-8">
                                                                    <asp:HyperLink ID="hplImageView" runat="server">
                                                                        <asp:Image ID="imgReal" runat="server" CssClass="BorderImage" />
                                                                    </asp:HyperLink>
                                                                    <span class="luotxem">Lượt xem:
                                                                        <asp:Label ID="lblTotalViews" runat="server" CssClass="number-total-views"></asp:Label></span>
                                                                </div>
                                                            </td>
                                                            <td width="315px" valign="top" style="padding: 5px;">
                                                                <table width="100%" border="0" cellpadding="5" cellspacing="0">
                                                                    <tr>
                                                                        <td align="left">
                                                                            <asp:HyperLink ID="hplRealEstateTitle" runat="server" CssClass="Raovat_Tieude"></asp:HyperLink>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="left">
                                                                            <b>Vị trí :</b>&nbsp;
                                                                            <%#TinhThanh.GetTenTinhThanhByID(ConvertUtility.ToInt32(Eval("TinhThanh")))%>
                                                                            -
                                                                            <%#QuanHuyen.GetTenQuanHuyenByID(ConvertUtility.ToInt32(Eval("QuanHuyen")))%>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="left" valign="top">
                                                                            <%# Eval("Mota").ToString().PadRight(128, ' ').Substring(0, 128)%>...
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td valign="top" class="line-y">
                                                            </td>
                                                            <td style="padding: 5px;" valign="top">
                                                                <table width="100%" border="0" cellpadding="5" cellspacing="0">
                                                                    <tr>
                                                                        <td align="left">
                                                                            <b>Giá :</b>&nbsp; <span style="color: #ff5d2b; font-weight: bold">
                                                                                <%# Globals.Gia((Decimal)Eval("Gia"), ConvertUtility.ToInt32(Eval("DonVT")),Convert.ToString(Eval("GiaTren")))%>
                                                                            </span>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="left">
                                                                            <b>Diện tích đất :
                                                                                <%# Eval("DientichDat")%></b>
                                                                            <%=Globals.MetVuong()%>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="left">
                                                                            <b>Ngày :</b>
                                                                            <%# Formatter.FormatDateTime(Convert.ToDateTime(Eval("AddedDate")))%>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="right" valign="bottom">
                                                                            <%# Globals.LuuTinRao(ConvertUtility.ToInt32(Eval("RaovatID"))) %>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="4" height="5px">
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="4" class="list-real-estate-menu-left-line">
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" width="100%">
                                            <div align="center">
                                                <asp:Panel ID="DisplayPager" runat="server">
                                                    <div align="center">
                                                        <table cellpadding="8" cellspacing="0" border="0" width="100%" align="center">
                                                            <tr>
                                                                <td valign="middle" align="center">
                                                                    <southern:Pager ID="Pager" runat="server" CssClass="LinkButton" />
                                                                </td>
                                                            </tr>
                                                            <tr class="Hidden">
                                                                <td valign="middle" align="center" style="padding-top: 15px;">
                                                                    <southern:CurrentPage ID="CurrentPage" runat="server" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </asp:Panel>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
        <td class="list-real-estate-frame-mid-right">
        </td>
    </tr>
    <tr>
        <td class="list-real-estate-frame-bot-left">
        </td>
        <td align="center" class="list-real-estate-frame-bot-center">
        </td>
        <td class="list-real-estate-frame-bot-right">
        </td>
    </tr>
</table>
